using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Attributes;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Attributes.DomainAttributes;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Enums;
using System.Collections.Generic;
using System.ComponentModel;

namespace Baci.ArcGIS._DataManagementTools._Workspace
{
    /// <summary>
    /// <para>Create Database Connection</para>
    /// <para>Creates a file that ArcGIS uses to connect to a database or an enterprise geodatabase.</para>
    /// <para>创建 ArcGIS 用于连接到数据库或企业级地理数据库的文件。</para>
    /// </summary>    
    [DisplayName("Create Database Connection")]
    public class CreateDatabaseConnection : AbstractGPProcess
    {
        /// <summary>
        /// 无参构造
        /// </summary>
        public CreateDatabaseConnection()
        {

        }

        /// <summary>
        /// 有参构造
        /// </summary>
        /// <param name="_out_folder_path">
        /// <para>Connection File Location</para>
        /// <para>The folder path where the database connection file (.sde) will be stored.</para>
        /// <para>将存储数据库连接文件 （.sde） 的文件夹路径。</para>
        /// </param>
        /// <param name="_out_name">
        /// <para>Connection File Name</para>
        /// <para>The name of the database connection file. The output file will have the extension .sde.</para>
        /// <para>数据库连接文件的名称。输出文件的扩展名为 .sde。</para>
        /// </param>
        /// <param name="_database_platform">
        /// <para>Database Platform</para>
        /// <para><xdoc>
        ///   <para>Specifies the database management system platform to which the connection will be made. The following are valid options:</para>
        ///   <bulletList>
        ///     <bullet_item>Dameng—Connect to Dameng.</bullet_item><para/>
        ///     <bullet_item>Db2—Connect to IBM Db2 for Linux, UNIX, or Windows.</bullet_item><para/>
        ///     <bullet_item>Oracle—Connect to Oracle, Amazon Relational Database Service (RDS) for Oracle, or Autonomous Transaction Processing database in Oracle Cloud.</bullet_item><para/>
        ///     <bullet_item>PostgreSQL—Connect to PostgreSQL, Amazon Aurora PostgreSQL, Amazon Relational Database Service (RDS) for PostgreSQL, or Microsoft Azure Database for PostgreSQL.</bullet_item><para/>
        ///     <bullet_item>SAP HANA—Connect to SAP HANA or SAP HANA Cloud.</bullet_item><para/>
        ///     <bullet_item>SQL Server—Connect to Microsoft SQL Server, Microsoft Azure SQL Database, Microsoft Azure SQL Managed Instance, or Amazon Relational Database Service (RDS) for SQL Server.</bullet_item><para/>
        ///     <bullet_item>Teradata—Connect to Teradata Data Warehouse Appliance.</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>指定将建立连接的数据库管理系统平台。以下是有效选项：</para>
        ///   <bulletList>
        ///     <bullet_item>Dameng - 连接到 Dameng。</bullet_item><para/>
        ///     <bullet_item>Db2 - 连接到 IBM Db2 for Linux， UNIX， or Windows。</bullet_item><para/>
        ///     <bullet_item>Oracle — 连接到 Oracle、Amazon Relational Database Service （RDS） for Oracle 或 Oracle Cloud 中的 Autonomous Transaction Processing 数据库。</bullet_item><para/>
        ///     <bullet_item>PostgreSQL - 连接到 PostgreSQL、Amazon Aurora PostgreSQL、Amazon Relational Database Service （RDS） for PostgreSQL 或 Microsoft Azure Database for PostgreSQL。</bullet_item><para/>
        ///     <bullet_item>SAP HANA - 连接到 SAP HANA 或 SAP HANA Cloud。</bullet_item><para/>
        ///     <bullet_item>SQL Server - 连接到 Microsoft SQL Server、Microsoft Azure SQL 数据库、Microsoft Azure SQL 托管实例或适用于 SQL Server 的 Amazon Relational Database Service （RDS）。</bullet_item><para/>
        ///     <bullet_item>Teradata - 连接到 Teradata Data Warehouse Appliance。</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// </param>
        /// <param name="_instance">
        /// <para>Instance</para>
        /// <para><xdoc>
        ///   <para>The database server or instance to which the connection will be made.</para>
        ///   <para>The value you choose from the Database Platform drop-down list indicates the type of database to which you want to connect. The information you provide for the Instance parameter varies, depending on the connection type you choose.</para>
        ///   <para>See below for information about what to provide for each database platform.</para>
        ///   <bulletList>
        ///     <bullet_item>Dameng—The name of the server where the Dameng database is installed
        ///     <bold></bold>
        ///     </bullet_item><para/>
        ///     <bullet_item>Db2—The name of the cataloged Db2 database</bullet_item><para/>
        ///     <bullet_item>Oracle—Either the TNS name or the Oracle Easy Connection string to connect to the Oracle database or database service</bullet_item><para/>
        ///     <bullet_item>PostgreSQL—The name of the server where PostgreSQL is installed or the name of the PostgreSQL database service instance</bullet_item><para/>
        ///     <bullet_item>SAP HANA—The Open Database Connectivity (ODBC) data source name for the SAP HANA database or database service</bullet_item><para/>
        ///     <bullet_item>SQL Server—The name of the SQL Server database instance or the name of the database service instance.</bullet_item><para/>
        ///     <bullet_item>Teradata—The ODBC data source name for the Teradata database</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>将建立连接的数据库服务器或实例。</para>
        ///   <para>从“数据库平台”下拉列表中选择的值指示要连接到的数据库类型。您为 Instance 参数提供的信息会有所不同，具体取决于您选择的连接类型。</para>
        ///   <para>有关为每个数据库平台提供的内容的信息，请参阅下文。</para>
        ///   <bulletList>
        /// <bullet_item>Dameng - 安装 Dameng 数据库的服务器的名称
        ///     <bold></bold>
        ///     </bullet_item><para/>
        ///     <bullet_item>Db2 - 已编目的 Db2 数据库的名称</bullet_item><para/>
        ///     <bullet_item>Oracle - 用于连接到 Oracle 数据库或数据库服务的 TNS 名称或 Oracle Easy Connection 字符串</bullet_item><para/>
        ///     <bullet_item>PostgreSQL - 安装 PostgreSQL 的服务器的名称或 PostgreSQL 数据库服务实例的名称</bullet_item><para/>
        ///     <bullet_item>SAP HANA - SAP HANA 数据库或数据库服务的开放式数据库连接 （ODBC） 数据源名称</bullet_item><para/>
        ///     <bullet_item>SQL Server - SQL Server 数据库实例的名称或数据库服务实例的名称。</bullet_item><para/>
        ///     <bullet_item>Teradata - Teradata 数据库的 ODBC 数据源名称</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// </param>
        public CreateDatabaseConnection(object _out_folder_path, object _out_name, _database_platform_value? _database_platform, object _instance)
        {
            this._out_folder_path = _out_folder_path;
            this._out_name = _out_name;
            this._database_platform = _database_platform;
            this._instance = _instance;
        }
        public override string ToolboxName => "Data Management Tools";

        public override string ToolName => "Create Database Connection";

        public override string CallName => "management.CreateDatabaseConnection";

        public override List<string> AcceptEnvironments => ["workspace"];

        public override object[] ParameterInfo => [_out_folder_path, _out_name, _database_platform.GetGPValue(), _instance, _account_authentication.GetGPValue(), _username, _password, _save_user_pass.GetGPValue(), _database, _schema, _version_type.GetGPValue(), _version, _date, _out_workspace];

        /// <summary>
        /// <para>Connection File Location</para>
        /// <para>The folder path where the database connection file (.sde) will be stored.</para>
        /// <para>将存储数据库连接文件 （.sde） 的文件夹路径。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Connection File Location")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _out_folder_path { get; set; }


        /// <summary>
        /// <para>Connection File Name</para>
        /// <para>The name of the database connection file. The output file will have the extension .sde.</para>
        /// <para>数据库连接文件的名称。输出文件的扩展名为 .sde。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Connection File Name")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _out_name { get; set; }


        /// <summary>
        /// <para>Database Platform</para>
        /// <para><xdoc>
        ///   <para>Specifies the database management system platform to which the connection will be made. The following are valid options:</para>
        ///   <bulletList>
        ///     <bullet_item>Dameng—Connect to Dameng.</bullet_item><para/>
        ///     <bullet_item>Db2—Connect to IBM Db2 for Linux, UNIX, or Windows.</bullet_item><para/>
        ///     <bullet_item>Oracle—Connect to Oracle, Amazon Relational Database Service (RDS) for Oracle, or Autonomous Transaction Processing database in Oracle Cloud.</bullet_item><para/>
        ///     <bullet_item>PostgreSQL—Connect to PostgreSQL, Amazon Aurora PostgreSQL, Amazon Relational Database Service (RDS) for PostgreSQL, or Microsoft Azure Database for PostgreSQL.</bullet_item><para/>
        ///     <bullet_item>SAP HANA—Connect to SAP HANA or SAP HANA Cloud.</bullet_item><para/>
        ///     <bullet_item>SQL Server—Connect to Microsoft SQL Server, Microsoft Azure SQL Database, Microsoft Azure SQL Managed Instance, or Amazon Relational Database Service (RDS) for SQL Server.</bullet_item><para/>
        ///     <bullet_item>Teradata—Connect to Teradata Data Warehouse Appliance.</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>指定将建立连接的数据库管理系统平台。以下是有效选项：</para>
        ///   <bulletList>
        ///     <bullet_item>Dameng - 连接到 Dameng。</bullet_item><para/>
        ///     <bullet_item>Db2 - 连接到 IBM Db2 for Linux， UNIX， or Windows。</bullet_item><para/>
        ///     <bullet_item>Oracle — 连接到 Oracle、Amazon Relational Database Service （RDS） for Oracle 或 Oracle Cloud 中的 Autonomous Transaction Processing 数据库。</bullet_item><para/>
        ///     <bullet_item>PostgreSQL - 连接到 PostgreSQL、Amazon Aurora PostgreSQL、Amazon Relational Database Service （RDS） for PostgreSQL 或 Microsoft Azure Database for PostgreSQL。</bullet_item><para/>
        ///     <bullet_item>SAP HANA - 连接到 SAP HANA 或 SAP HANA Cloud。</bullet_item><para/>
        ///     <bullet_item>SQL Server - 连接到 Microsoft SQL Server、Microsoft Azure SQL 数据库、Microsoft Azure SQL 托管实例或适用于 SQL Server 的 Amazon Relational Database Service （RDS）。</bullet_item><para/>
        ///     <bullet_item>Teradata - 连接到 Teradata Data Warehouse Appliance。</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Database Platform")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public _database_platform_value? _database_platform { get; set; }

        public enum _database_platform_value
        {
            /// <summary>
            /// <para>SQL Server</para>
            /// <para>SQL Server—Connect to Microsoft SQL Server, Microsoft Azure SQL Database, Microsoft Azure SQL Managed Instance, or Amazon Relational Database Service (RDS) for SQL Server.</para>
            /// <para>SQL Server - 连接到 Microsoft SQL Server、Microsoft Azure SQL 数据库、Microsoft Azure SQL 托管实例或适用于 SQL Server 的 Amazon Relational Database Service （RDS）。</para>
            /// </summary>
            [Description("SQL Server")]
            [GPEnumValue("SQL_SERVER")]
            _SQL_SERVER,

            /// <summary>
            /// <para>Oracle</para>
            /// <para>Oracle—Connect to Oracle, Amazon Relational Database Service (RDS) for Oracle, or Autonomous Transaction Processing database in Oracle Cloud.</para>
            /// <para>Oracle — 连接到 Oracle、Amazon Relational Database Service （RDS） for Oracle 或 Oracle Cloud 中的 Autonomous Transaction Processing 数据库。</para>
            /// </summary>
            [Description("Oracle")]
            [GPEnumValue("ORACLE")]
            _ORACLE,

            /// <summary>
            /// <para>Db2</para>
            /// <para>Db2—Connect to IBM Db2 for Linux, UNIX, or Windows.</para>
            /// <para>Db2 - 连接到 IBM Db2 for Linux， UNIX， or Windows。</para>
            /// </summary>
            [Description("Db2")]
            [GPEnumValue("DB2")]
            _DB2,

            /// <summary>
            /// <para>PostgreSQL</para>
            /// <para>PostgreSQL—Connect to PostgreSQL, Amazon Aurora PostgreSQL, Amazon Relational Database Service (RDS) for PostgreSQL, or Microsoft Azure Database for PostgreSQL.</para>
            /// <para>PostgreSQL - 连接到 PostgreSQL、Amazon Aurora PostgreSQL、Amazon Relational Database Service （RDS） for PostgreSQL 或 Microsoft Azure Database for PostgreSQL。</para>
            /// </summary>
            [Description("PostgreSQL")]
            [GPEnumValue("POSTGRESQL")]
            _POSTGRESQL,

            /// <summary>
            /// <para>Teradata</para>
            /// <para>Teradata—Connect to Teradata Data Warehouse Appliance.</para>
            /// <para>Teradata - 连接到 Teradata Data Warehouse Appliance。</para>
            /// </summary>
            [Description("Teradata")]
            [GPEnumValue("TERADATA")]
            _TERADATA,

            /// <summary>
            /// <para>SAP HANA</para>
            /// <para>SAP HANA—Connect to SAP HANA or SAP HANA Cloud.</para>
            /// <para>SAP HANA - 连接到 SAP HANA 或 SAP HANA Cloud。</para>
            /// </summary>
            [Description("SAP HANA")]
            [GPEnumValue("SAP HANA")]
            _SAP_HANA,

            /// <summary>
            /// <para>Dameng</para>
            /// <para>Dameng—Connect to Dameng.</para>
            /// <para>Dameng - 连接到 Dameng。</para>
            /// </summary>
            [Description("Dameng")]
            [GPEnumValue("DAMENG")]
            _DAMENG,

        }

        /// <summary>
        /// <para>Instance</para>
        /// <para><xdoc>
        ///   <para>The database server or instance to which the connection will be made.</para>
        ///   <para>The value you choose from the Database Platform drop-down list indicates the type of database to which you want to connect. The information you provide for the Instance parameter varies, depending on the connection type you choose.</para>
        ///   <para>See below for information about what to provide for each database platform.</para>
        ///   <bulletList>
        ///     <bullet_item>Dameng—The name of the server where the Dameng database is installed
        ///     <bold></bold>
        ///     </bullet_item><para/>
        ///     <bullet_item>Db2—The name of the cataloged Db2 database</bullet_item><para/>
        ///     <bullet_item>Oracle—Either the TNS name or the Oracle Easy Connection string to connect to the Oracle database or database service</bullet_item><para/>
        ///     <bullet_item>PostgreSQL—The name of the server where PostgreSQL is installed or the name of the PostgreSQL database service instance</bullet_item><para/>
        ///     <bullet_item>SAP HANA—The Open Database Connectivity (ODBC) data source name for the SAP HANA database or database service</bullet_item><para/>
        ///     <bullet_item>SQL Server—The name of the SQL Server database instance or the name of the database service instance.</bullet_item><para/>
        ///     <bullet_item>Teradata—The ODBC data source name for the Teradata database</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>将建立连接的数据库服务器或实例。</para>
        ///   <para>从“数据库平台”下拉列表中选择的值指示要连接到的数据库类型。您为 Instance 参数提供的信息会有所不同，具体取决于您选择的连接类型。</para>
        ///   <para>有关为每个数据库平台提供的内容的信息，请参阅下文。</para>
        ///   <bulletList>
        /// <bullet_item>Dameng - 安装 Dameng 数据库的服务器的名称
        ///     <bold></bold>
        ///     </bullet_item><para/>
        ///     <bullet_item>Db2 - 已编目的 Db2 数据库的名称</bullet_item><para/>
        ///     <bullet_item>Oracle - 用于连接到 Oracle 数据库或数据库服务的 TNS 名称或 Oracle Easy Connection 字符串</bullet_item><para/>
        ///     <bullet_item>PostgreSQL - 安装 PostgreSQL 的服务器的名称或 PostgreSQL 数据库服务实例的名称</bullet_item><para/>
        ///     <bullet_item>SAP HANA - SAP HANA 数据库或数据库服务的开放式数据库连接 （ODBC） 数据源名称</bullet_item><para/>
        ///     <bullet_item>SQL Server - SQL Server 数据库实例的名称或数据库服务实例的名称。</bullet_item><para/>
        ///     <bullet_item>Teradata - Teradata 数据库的 ODBC 数据源名称</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Instance")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _instance { get; set; }


        /// <summary>
        /// <para>Database Authentication</para>
        /// <para><xdoc>
        ///   <para>Specifies the type of authentication that will be used.</para>
        ///   <bulletList>
        ///     <bullet_item>Checked—Database authentication will be used. An internal database user name and a password will be used to connect to the database. You aren't required to type your user name and password to create a connection; however, if you don't, you will be prompted to enter them when a connection is established.</bullet_item><para/>
        ///     <bullet_item>Unchecked—Operating system authentication will be used. You do not need to type a user name and password. The connection will be made with the user name and password that were used to log in to the operating system. If the login used for the operating system is not a valid geodatabase login, the connection will fail.</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>指定将使用的身份验证类型。</para>
        ///   <bulletList>
        ///     <bullet_item>选中 - 将使用数据库身份验证。内部数据库用户名和密码将用于连接到数据库。您无需键入用户名和密码即可创建连接;但是，如果不这样做，则在建立连接时将提示您输入它们。</bullet_item><para/>
        ///     <bullet_item>未选中 - 将使用操作系统身份验证。您无需键入用户名和密码。将使用用于登录操作系统的用户名和密码进行连接。如果用于操作系统的登录帐户不是有效的地理数据库登录帐户，则连接将失败。</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Database Authentication")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public _account_authentication_value _account_authentication { get; set; } = _account_authentication_value._true;

        public enum _account_authentication_value
        {
            /// <summary>
            /// <para>DATABASE_AUTH</para>
            /// <para></para>
            /// <para></para>
            /// </summary>
            [Description("DATABASE_AUTH")]
            [GPEnumValue("true")]
            _true,

            /// <summary>
            /// <para>OPERATING_SYSTEM_AUTH</para>
            /// <para></para>
            /// <para></para>
            /// </summary>
            [Description("OPERATING_SYSTEM_AUTH")]
            [GPEnumValue("false")]
            _false,

        }

        /// <summary>
        /// <para>Username</para>
        /// <para>The database user name that will be used for database authentication.</para>
        /// <para>将用于数据库身份验证的数据库用户名。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Username")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public object _username { get; set; } = null;


        /// <summary>
        /// <para>Password</para>
        /// <para>The database user password that will be used for database authentication.</para>
        /// <para>将用于数据库身份验证的数据库用户密码。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Password")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public object _password { get; set; } = null;


        /// <summary>
        /// <para>Save username and password</para>
        /// <para><xdoc>
        ///   <para>Specifies whether the user name and password will be saved.</para>
        ///   <bulletList>
        ///     <bullet_item>Checked—The user name and password will be saved in the connection file. This is the default. If the connection file you are creating will provide ArcGIS services with access to the geodatabase, you must save the user name and password.</bullet_item><para/>
        ///     <bullet_item>Unchecked—The user name and password will not be saved in the connection file. Every time you attempt to connect using the file, you will be prompted for the user name and password.</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>指定是否保存用户名和密码。</para>
        ///   <bulletList>
        ///     <bullet_item>选中 - 用户名和密码将保存在连接文件中。这是默认设置。如果要创建的连接文件将为 ArcGIS 服务提供对地理数据库的访问权限，则必须保存用户名和密码。</bullet_item><para/>
        ///     <bullet_item>未选中 - 用户名和密码不会保存在连接文件中。每次尝试使用该文件进行连接时，系统都会提示您输入用户名和密码。</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Save username and password")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public _save_user_pass_value _save_user_pass { get; set; } = _save_user_pass_value._true;

        public enum _save_user_pass_value
        {
            /// <summary>
            /// <para>SAVE_USERNAME</para>
            /// <para></para>
            /// <para></para>
            /// </summary>
            [Description("SAVE_USERNAME")]
            [GPEnumValue("true")]
            _true,

            /// <summary>
            /// <para>DO_NOT_SAVE_USERNAME</para>
            /// <para></para>
            /// <para></para>
            /// </summary>
            [Description("DO_NOT_SAVE_USERNAME")]
            [GPEnumValue("false")]
            _false,

        }

        /// <summary>
        /// <para>Database</para>
        /// <para>The name of the database to which the connection will be made. This parameter only applies to PostgreSQL and SQL Server platforms.</para>
        /// <para>将建立连接的数据库的名称。此参数仅适用于 PostgreSQL 和 SQL Server 平台。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Database")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public object _database { get; set; } = null;


        /// <summary>
        /// <para>Schema (Oracle user schema geodatabases only)</para>
        /// <para>The user schema geodatabase to which the connection will be made. The tool will determine if it is connecting to an Oracle database that contains a user–schema geodatabase. If the Oracle database contains a user schema, this option is active; otherwise, it remains inactive. The default option for this parameter is to use the sde schema geodatabase.</para>
        /// <para>将与之建立连接的用户方案地理数据库。该工具将确定它是否正在连接到包含用户方案地理数据库的 Oracle 数据库。如果 Oracle 数据库包含用户架构，则此选项处于活动状态;否则，它将保持非活动状态。此参数的默认选项是使用 sde 方案地理数据库。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Schema (Oracle user schema geodatabases only)")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public object _schema { get; set; } = null;


        /// <summary>
        /// <para>Version Type</para>
        /// <para><xdoc>
        ///   <para>Specifies the type of version to which the connection will be made. This parameter only applies when connecting to a geodatabase.</para>
        ///   <bulletList>
        ///     <bullet_item>Transactional—Connect to a transactional version. If Transactional is selected, the The following version will be used parameter will be populated with a list of transactional versions, and the Date and Time parameter will be inactive. This is the default.</bullet_item><para/>
        ///     <bullet_item>Historical—Connect to an historical marker. If Historical is selected, the The following version will be used parameter will be populated with a list of historical markers, and the Date and Time parameter will be inactive.</bullet_item><para/>
        ///     <bullet_item>Point in time—Connect to a specific point in time. If Point in time is selected, the The following version will be used parameter will be inactive, and the Date and Time parameter will become active.</bullet_item><para/>
        ///     <bullet_item>Branch—Connect to the default branch version.</bullet_item><para/>
        ///   </bulletList>
        ///   <para>
        ///     <para>If Historical is selected and a name is not provided, the default transactional version is used. If Point in time is selected and a date is not provided in the Date and Time parameter, the default transactional version is used.</para>
        ///   </para>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>指定将建立连接的版本类型。此参数仅在连接到地理数据库时适用。</para>
        ///   <bulletList>
        ///     <bullet_item>事务性 - 连接到事务性版本。如果选择“事务性”，则“将使用以下版本”参数填充事务性版本列表，并且“日期和时间”参数将处于非活动状态。这是默认设置。</bullet_item><para/>
        ///     <bullet_item>历史 - 连接到历史标记。如果选择“历史”，则将使用历史标记列表填充“将使用以下版本”参数，并且“日期和时间”参数将处于非活动状态。</bullet_item><para/>
        ///     <bullet_item>时间点 - 连接到特定时间点。如果选择“时间点”，则“将使用以下版本”参数将处于非活动状态，而“日期和时间”参数将变为活动状态。</bullet_item><para/>
        ///     <bullet_item>分支 （Branch） - 连接到默认分支版本。</bullet_item><para/>
        ///   </bulletList>
        ///   <para>
        ///     <para>如果选择了“历史”且未提供名称，则使用默认事务版本。如果选择了时间点，并且未在日期和时间参数中提供日期，则使用默认事务版本。</para>
        ///   </para>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Version Type")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public _version_type_value _version_type { get; set; } = _version_type_value._TRANSACTIONAL;

        public enum _version_type_value
        {
            /// <summary>
            /// <para>Transactional</para>
            /// <para>Transactional—Connect to a transactional version. If Transactional is selected, the The following version will be used parameter will be populated with a list of transactional versions, and the Date and Time parameter will be inactive. This is the default.</para>
            /// <para>事务性 - 连接到事务性版本。如果选择“事务性”，则“将使用以下版本”参数填充事务性版本列表，并且“日期和时间”参数将处于非活动状态。这是默认设置。</para>
            /// </summary>
            [Description("Transactional")]
            [GPEnumValue("TRANSACTIONAL")]
            _TRANSACTIONAL,

            /// <summary>
            /// <para>Historical</para>
            /// <para>Historical—Connect to an historical marker. If Historical is selected, the The following version will be used parameter will be populated with a list of historical markers, and the Date and Time parameter will be inactive.</para>
            /// <para>历史 - 连接到历史标记。如果选择“历史”，则将使用历史标记列表填充“将使用以下版本”参数，并且“日期和时间”参数将处于非活动状态。</para>
            /// </summary>
            [Description("Historical")]
            [GPEnumValue("HISTORICAL")]
            _HISTORICAL,

            /// <summary>
            /// <para>Point in time</para>
            /// <para>Point in time—Connect to a specific point in time. If Point in time is selected, the The following version will be used parameter will be inactive, and the Date and Time parameter will become active.</para>
            /// <para>时间点 - 连接到特定时间点。如果选择“时间点”，则“将使用以下版本”参数将处于非活动状态，而“日期和时间”参数将变为活动状态。</para>
            /// </summary>
            [Description("Point in time")]
            [GPEnumValue("POINT_IN_TIME")]
            _POINT_IN_TIME,

            /// <summary>
            /// <para>Branch</para>
            /// <para>Branch—Connect to the default branch version.</para>
            /// <para>分支 （Branch） - 连接到默认分支版本。</para>
            /// </summary>
            [Description("Branch")]
            [GPEnumValue("BRANCH")]
            _BRANCH,

        }

        /// <summary>
        /// <para>The following version will be used</para>
        /// <para><xdoc>
        ///   <para>The geodatabase transactional version or historical marker to which the connect will be made. The default option uses the default transactional version.</para>
        ///   <para>If you choose a branch version type, the connection is always to the default branch version.</para>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>将进行连接的地理数据库事务版本或历史标记。默认选项使用默认事务版本。</para>
        ///   <para>如果选择分支版本类型，则始终连接到默认分支版本。</para>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("The following version will be used")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public object _version { get; set; } = null;


        /// <summary>
        /// <para>Date and Time</para>
        /// <para><xdoc>
        ///   <para>The value representing the date and time that will be used to connect to the database. This option is used with archive-enabled data. Use the time picker to choose the appropriate date.</para>
        ///   <para>If manually entering a date, the following formats can be used:
        ///   <bulletList>
        ///     <bullet_item>6/9/2011 4:20:15 PM  </bullet_item><para/>
        ///     <bullet_item>6/9/2011 16:20:15  </bullet_item><para/>
        ///     <bullet_item>6/9/2011  </bullet_item><para/>
        ///     <bullet_item>4:20:15 PM  </bullet_item><para/>
        ///     <bullet_item>16:20:15  </bullet_item><para/>
        ///   </bulletList>
        ///   </para>
        ///   <para>
        ///     <bulletList>
        ///       <bullet_item>If a time is entered without a date, the default date of December 30, 1899, is used.</bullet_item><para/>
        ///       <bullet_item>If a date is entered without a time, the default time of 12:00:00 AM will be used.</bullet_item><para/>
        ///     </bulletList>
        ///   </para>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>表示将用于连接到数据库的日期和时间的值。此选项用于启用存档的数据。使用时间选取器选择适当的日期。</para>
        /// <para>如果手动输入日期，可以使用以下格式：
        ///   <bulletList>
        ///     <bullet_item>2011/6/9 16：20：15</bullet_item><para/>
        ///     <bullet_item>6/9/2011 16:20:15</bullet_item><para/>
        ///     <bullet_item>6/9/2011</bullet_item><para/>
        ///     <bullet_item>下午4：20：15</bullet_item><para/>
        ///     <bullet_item>16:20:15</bullet_item><para/>
        ///   </bulletList>
        ///   </para>
        ///   <para>
        ///     <bulletList>
        ///       <bullet_item>如果输入的时间没有日期，则使用默认日期 1899 年 12 月 30 日。</bullet_item><para/>
        ///       <bullet_item>如果输入的日期没有时间，则将使用默认时间 12：00：00 AM。</bullet_item><para/>
        ///     </bulletList>
        ///   </para>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Date and Time")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public object _date { get; set; } = null;


        /// <summary>
        /// <para>Output Workspace</para>
        /// <para></para>
        /// <para></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Output Workspace")]
        [Description("")]
        [Option(OptionTypeEnum.derived)]
        public object _out_workspace { get; set; }


        public CreateDatabaseConnection SetEnv(object workspace = null)
        {
            base.SetEnv(workspace: workspace);
            return this;
        }

    }

}